package com.xiangmo.travel.Service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiangmo.travel.Dto.AttractionsCommentsDto;
import com.xiangmo.travel.Dto.AttractionsCommentsInfoDto;
import com.xiangmo.travel.Dto.PageInfoDto;
import com.xiangmo.travel.Entity.AttractionsComments;

import java.util.List;


public interface AttractionsCommentsService {
    //添加评论
    int addComment(AttractionsCommentsDto attractionsCommentsDto);
    //根据id 查询父评论 需要判断字段的父评论id为空
    PageInfoDto<AttractionsCommentsInfoDto> getCommentByAttractionsId(Long id, int pageNum, int pageSize);
    //登录后 根据id 查询父评论 需要判断字段的父评论id为空
    PageInfoDto<AttractionsCommentsInfoDto> getCommentByAttractionsIdAndUserId(Long userId, Long id, int pageNum, int pageSize);
    //删除评论
    int deleteCommentById(Long id);
    //回复评论 子
    int addChildComment(AttractionsCommentsDto attractionsCommentsDto);
    //根据父评论查询子评论
    PageInfoDto<AttractionsCommentsInfoDto> getCommentByParentId(Long id, int pageNum, int pageSize);
    //登录后 根据父评论查询子评论
    PageInfoDto<AttractionsCommentsInfoDto> getCommentByParentIdAndUserId(Long userId, Long id, int pageNum, int pageSize);
    //查询父子评论数量
    Long getAllCommentNum(Long attractionsId);
}
